Product Code Database
Example Keywords: strategy games -stitch $50-156
barcode-scavenger
   » » Wiki: Core Foundation
Tag Wiki 'Core Foundation'.
Tag

Core Foundation
 ( ) 

Core Foundation (also called CF) is a C application programming interface (API) written by Apple Inc. for its , and is a mix of low-level routines and . Most Core Foundation routines follow a certain naming convention that deal with opaque objects, for example CFDictionaryRef for functions whose names begin with CFDictionary, and these objects are often reference counted (manually) through CFRetain and CFRelease. Internally, Core Foundation forms the base of the types in the standard library and the .

The most prevalent use of Core Foundation is for passing its own primitive types for data, including raw , strings, , , and UUIDs, as well as collections such as arrays, sets, and , to numerous macOS C routines, primarily those that are GUI-related. At the operating system level Core Foundation also provides standardized application preferences management through CFPropertyList, bundle handling, , interprocess communication through CFMachPort and CFNotificationCenter, and a basic graphical user interface message dialog through CFUserNotification.

Other parts of the API include utility routines and wrappers around existing APIs for ease of use. Utility routines perform such actions as and I/O through CFReadStream, CFWriteStream, and CFURL and translation (Byte Order Utilities). Some examples of wrapper routines include those for Core Foundation's wrapper routines for Unix sockets, the CFSocket API.

Some types in Core Foundation are "toll-free bridged", or interchangeable with a simple cast, with those of their counterparts. For example, one could create a CFDictionaryRef Core Foundation type, and then later simply use a standard C cast to convert it to its Objective-C counterpart, NSDictionary *, and then use the desired Objective-C methods on that object as one normally would.

Core Foundation has a plug-in model () that is based on the Component Object Model.


Open source availability
Apple used to release most of CF as an open-source project called CFLite that can be used to write cross-platform applications for macOS, , and Windows.

A third-party open-source implementation called OpenCFLite extends the Apple CFLite for building on 32-bit Windows and environments. It is maintained by one of the developers, but was stalled by 2015. OpenCFLite project on SourceForge. The karaoke platform KJams maintains a fork since 2017. This version, by its programmer David M. Cotter, supports 64-bit systems and has a CFNetwork implementation with -based TLS. A fork of OpenCFLite was created by Grant Erickson (an original collaborator with Brent Fulgham on the SourceForge version) in 2021 with a companion port of the CFHost portion of CFNetwork, as OpenCFNetwork.

The Swift Corelib Foundation, a fallback version of the for the Swift programming language for non-Apple platforms, contains a near-full version of the Core Foundation released under Apache License 2.0.

includes a version of the Core Foundation called "libs-corebase".


See also


External links

Page 1 of 1
1
Page 1 of 1
1

Account

Social:
Pages:  ..   .. 
Items:  .. 

Navigation

General: Atom Feed Atom Feed  .. 
Help:  ..   .. 
Category:  ..   .. 
Media:  ..   .. 
Posts:  ..   ..   .. 

Statistics

Page:  .. 
Summary:  .. 
1 Tags
10/10 Page Rank
5 Page Refs